﻿// COPYRIGHT (C) Markeluo ALL RIGHTS RESERVED. 
// GITEE: https://gitee.com/luowanli/AntdUI 
// QQ: 563944808

namespace IMES.VO
{
    public class SysUserVO : AntdUI.NotifyProperty
    {
        public SysUserVO()
        {
            _btns = new AntdUI.CellLink[] {
                new AntdUI.CellButton("edit", "编辑"){Fore=Color.FromArgb(255,143,11),Radius=0,DefaultBack=Color.Transparent,Back=Color.Transparent},
                new AntdUI.CellButton("delete", "删除"){ Fore=Color.FromArgb(176,8,8),Radius=0,DefaultBack=Color.Transparent,Back=Color.Transparent}
            };
        }

        AntdUI.CellLink[] _btns;
        public AntdUI.CellLink[] btns
        {
            get => _btns;
            set
            {
                _btns = value;
                OnPropertyChanged();
            }
        }

        private long _id;
        private bool _check = false;
        private bool _usable;
        private string _userCode;
        private string _userName;
        private string _password;
        private string _mobile;
        private string _loginTime;
        private string _loginIP;
        private string _remark;
        private string _creator;
        private DateTime _createTime;
        private string _roleName;

        public long Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public bool check
        {
            get => _check;
            set
            {
                if (_check == value) return;
                _check = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 用户名 
        ///</summary>
        public string UserCode
        {
            get { return _userCode; }
            set
            {
                if (_userCode == value) return;
                _userCode = value;
                OnPropertyChanged();
            }
        }
        /// <summary>
        /// 姓名 
        ///</summary>
        public string UserName 
        {
            get { return _userName; }
            set
            {
                if (_userName == value) return;
                _userName = value;
                OnPropertyChanged();
            }
        }
        /// <summary>
        /// 密码 
        ///</summary>
        public string Password 
        {
            get { return _password; }
            set
            {
                if (_password == value) return;
                _password = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 手机号 
        ///</summary>
        public string Mobile
        {
            get { return _mobile; }
            set
            {
                if (_mobile == value) return;
                _mobile = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 可用状态 
        ///</summary>
        public bool Usable
        {
            get { return _usable; }
            set
            {
                if (_usable == value) return;
                _usable = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 最后登录时间
        ///</summary>
        public string LoginTime
        {
            get { return _loginTime; }
            set
            {
                if (_loginTime == value) return;
                _loginTime = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 最后登录IP 
        ///</summary>
        public string LoginIP
        {
            get { return _loginIP; }
            set
            {
                if (_loginIP == value) return;
                _loginIP = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark
        {
            get { return _remark; }
            set
            {
                if (_remark == value) return;
                _remark = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 创建人
        /// </summary>
        public string Creator
        {
            get { return _creator; }
            set
            {
                if (_creator == value) return;
                _creator = value;
                OnPropertyChanged();
            }
        }

        public string RoleName
        {
            get { return _roleName; }
            set
            {
                if (_roleName == value) return;
                _roleName = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime
        {
            get { return _createTime; }
            set
            {
                if (_createTime == value) return;
                _createTime = value;
                OnPropertyChanged();
            }
        }
    }
}
